<?php
/**
 * User: WL
 * Time: 12-10-13 - 上午9:14
 * File: list.inc.php
 * Project For ixdcw.com
 */
/**
 * 2013-4-1 Sameal add order by cityid an group level
 */
defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE.'/buyhelp/common.inc.php';
if(!empty($CAT) && $CAT['moduleid'] != 26) {
	$head_title = lang('message->cate_not_exists');
	@header("HTTP/1.1 404 Not Found");
	exit(include template('list-notfound', 'message'));
}
ViewCheck::groupListPermission() or Prompt::noPermission();
$navname ='new';
$table  = Table::name(Table::NAME_INFORMATION);
$fields = 'title,itemid,edittime';

$order= 'edittime desc';
$condition = 'status=3 ';
if (!empty($CAT)) {
	$condition .= " and catid={$catid}";
}
$catname = $CAT['catname'] ? $CAT['catname'] : '综合信息';

if (!empty($cartypeid)) {
	$condition .= " and cartypeid={$cartypeid}";
}

$pn = new Pagination();
$pagesize = 60;
$items    = $db->count($table, $condition);
$pn->recordsPerPage($pagesize);
$pn->records($items);

$list = $db->getAll("select $fields from {$table} where $condition order by {$order} limit ". ($pn->getPage() - 1) * $pagesize . ',' . $pagesize);


$MOD['name']='买车助手_新车';
$seo_file = 'index';
include DT_INC.'/seo.inc.php';
include template('newList', 'buyhelp');

